package com.ynet.middleground.contract.bean;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author liulx
 * @description 签署文件、印章、签名域等信息
 * @date 2020-04-27 13:58
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "签署文件、印章、签名域等信息", description = "签署文件、印章、签名域等信息")
public class SigningParamBean implements Serializable {

    private static final long serialVersionUID = -5666482062992573927L;

    @ApiModelProperty(value = "PDF 文件短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf",
        notes = "PDF 文件短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf", dataType = "String", required = true)
    @NotBlank(message = "PDF 文件地址不能为空")
    private String pdfUrl;

    @ApiModelProperty(value = "关联合约 id，如果是通过中台生成的合约该项必填", notes = "关联合约 id，如果是通过中台生成的合约该项必填", dataType = "Integer")
    private Integer contractId;

    @ApiModelProperty(value = "客户自由标示位，用于辨识文件，每次请求时不可与本次请求的其他文件标识位重复", notes = "客户自由标示位，用于辨识文件，每次请求时不可与本次请求的其他文件标识位重复",
        dataType = "String", required = true)
    @NotBlank(message = "客户自由标示位不能为空")
    private String markBit;

    @ApiModelProperty(value = "文档编辑密码，当目标 PDF 设置权限保护时必填", notes = "文档编辑密码，当目标 PDF 设置权限保护时必填", dataType = "String")
    private String ownerPassword;

    @ApiModelProperty(value = "签章位置信息", notes = "签章位置信息", dataType = "com.ynet.middleground.contract.bean.SignPos",
        required = true)
    @NotNull(message = "签章位置信息不能为空")
    private SignPos signPos;

    @ApiModelProperty(value = "签章类型\nSingle: 单页签章\nMulti: 多页签章\nEdges: 签骑缝章\nKey: 关键字签章",
        notes = "签章类型\nSingle: 单页签章\nMulti: 多页签章\nEdges: 签骑缝章\nKey: 关键字签章", dataType = "String", required = true)
    @NotBlank(message = "签章类型不能为空")
    private String signType;

}
